#!/bin/sh

# Insert annotations (from an annotation file) into a Java source file.
# For usage information, run: insert-annotations-to-source --help 
# See the annotation file utilities documentation for more information.

ANNOTATION_FILE_UTILS=$(dirname $0)/../bin:$(dirname $0)/../../scene-lib/bin:$(dirname $0)/../../asmx/bin:$(dirname $0)/../annotation-file-utilities.jar
# Contains new version of java.lang.annotation.ElementType.
LANGTOOLS=${LANGTOOLS:-$(dirname $0)/../../../jsr308-langtools}
JAVAC_JAR=${JAVAC_JAR:-${LANGTOOLS}/dist/lib/javac.jar}

# Augment, don't replace, CLASSPATH, so as to find user files.
# Can we can do without annotation-file-utilities.jar on bootclasspath?
java -ea -Xbootclasspath/p:${JAVAC_JAR} -classpath ${ANNOTATION_FILE_UTILS}:${CLASSPATH} annotator.Main "$@"
